import Paragraph from './index.vue'
import { Popover, Button } from 'element-ui'

const install = (Vue, options) => {
  if (install.installed) return
  install.installed = true
  Vue.component(Paragraph.name, Paragraph)
  Vue.component(Popover.name, Popover)
  Vue.component(Button.name, Button)
}

// 如果是直接引入的
if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

export default {
  // 使用Vue.use必须具有install方法
  // https://cn.vuejs.org/v2/api/#Vue-use
  install
}
